Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@walletconnect/types

Package Overview
Dependencies
0
Maintainers
5
Versions
584
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @walletconnect/types

Typescript Types for WalletConnect


Version published
Weekly downloads
583K
increased by0.28%
Maintainers
5
Install size
10.8 kB
Created
Weekly downloads
 

Package description

What is @walletconnect/types?

@walletconnect/types is a TypeScript package that provides type definitions for the WalletConnect protocol. It is used to ensure type safety and consistency when developing applications that integrate with WalletConnect.

What are @walletconnect/types's main functionalities?

Session Types

Defines the structure of a WalletConnect session, including details about the peer, permissions, and expiry.

import { SessionTypes } from '@walletconnect/types';

const session: SessionTypes.Created = {
  topic: 'abc123',
  relay: { protocol: 'waku' },
  peer: { metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
  permissions: { blockchain: { chains: ['eip155:1'] }, jsonrpc: { methods: ['eth_sendTransaction'] } },
  expiry: 1234567890
};

Proposal Types

Defines the structure of a WalletConnect proposal, including details about the proposer and required namespaces.

import { ProposalTypes } from '@walletconnect/types';

const proposal: ProposalTypes.Struct = {
  id: 1,
  params: {
    proposer: { publicKey: '0xabc123', metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
    requiredNamespaces: { eip155: { methods: ['eth_sendTransaction'], chains: ['eip155:1'], events: ['accountsChanged'] } }
  }
};

Error Types

Defines the structure of error types used in WalletConnect, including error codes and messages.

import { ErrorTypes } from '@walletconnect/types';

const error: ErrorTypes.Provider = {
  code: 4001,
  message: 'User rejected the request.'
};

Other packages similar to @walletconnect/types

Readme

Source

WalletConnect Types

Typescript Types for WalletConnect

Types

  • ICryptoLib
  • ISessionStorage
  • IEncryptionPayload
  • ISocketMessage
  • ISessionStatus
  • ISessionError
  • IInternalEvent
  • ICallTxData
  • ITxData
  • IJsonRpcResponseSuccess
  • IJsonRpcErrorMessage
  • IJsonRpcResponseError
  • IJsonRpcRequest
  • IWeb3Provider
  • IClientMeta
  • IEventEmitter
  • IRequiredParamsResult
  • IQueryParamsResult
  • IParseURIResult
  • ISessionParams
  • IWalletConnectSession
  • IWalletConnectOptions
  • IPushServerOptions
  • INativeWalletOptions
  • IPushSubscription

Keywords

FAQs

Last updated on 02 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc